const wishModel = require('../models/wishModel');

class wish {
    list(page_num, page_size) {
        return wishModel.list(page_num, page_size);
    }
    modify(wish_text, id) {
        const date = new Date().toLocaleString()
        const createAt = date
        return wishModel.modify(wish_text, createAt, id);
    }
    publish(wish_text, imgUrl, user_id, username) {
        const date = new Date().toLocaleString()
        const createAt = date
        return wishModel.publish(wish_text, createAt, imgUrl, user_id, username);
    }
    remove(id) {
        return wishModel.remove(id);
    }
    search(keyword) {
        return wishModel.search(keyword);
    }
}

module.exports = wish